import request from '@/utils/request'

// 查询简答题列表
export function listShortAnswer(query) {
  return request({
    url: '/exam/shortAnswer/list',
    method: 'get',
    params: query
  })
}

// 查询简答题详细
export function getShortAnswer(shortId) {
  return request({
    url: '/exam/shortAnswer/' + shortId,
    method: 'get'
  })
}

// 新增简答题
export function addShortAnswer(data) {
  return request({
    url: '/exam/shortAnswer',
    method: 'post',
    data: data
  })
}

// 修改简答题
export function updateShortAnswer(data) {
  return request({
    url: '/exam/shortAnswer',
    method: 'put',
    data: data
  })
}

// 删除简答题
export function delShortAnswer(shortId) {
  return request({
    url: '/exam/shortAnswer/' + shortId,
    method: 'delete'
  })
}

// 导出简答题
export function exportShortAnswer(query) {
  return request({
    url: '/exam/shortAnswer/export',
    method: 'get',
    params: query
  })
}